package com.ymatou.iapi.delivery.testcase;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.client.ClientProtocolException;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.google.common.collect.Lists;
import com.ymatou.iapi.delivery.parameter.DeliveryInfo;
import com.ymatou.iapi.delivery.parameter.DeliveryReq;
import com.ymatou.iapi.delivery.parameter.enums.CheckBizResultEnum;
import com.ymatou.iapi.delivery.parameter.resp.BillNoCheckResp;
import com.ymatou.iapi.delivery.parameter.resp.BillNoCheckResult;
import com.ymatou.iapi.delivery.parameter.resp.ExpectCheckResult;
import com.ymatou.iapi.delivery.service.BillNoCheckCall;
import com.ymatou.iapi.delivery.service.DeliveryService;
import com.ymatou.iapi.optrade.parameter.enums.BizTypeEnum;
import com.ymatou.iapi.optrade.parameter.enums.LogisticsTypeEnum;
import com.ymatou.iapi.optrade.parameter.enums.OrderSourceEnum;
import com.ymatou.iapi.optrade.parameter.req.PlaceOrderReq;
import com.ymatou.iapi.optrade.parameter.vo.BizVo;
import com.ymatou.iapi.optrade.parameter.vo.OrderVo;
import com.ymatou.iapi.optrade.resp.TradingServiceResp;
import com.ymatou.iapi.synctrade.service.TradingSyncService;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymttest.business.service.AccountCallServiceV2;
import com.ymttest.business.service.JUserCallService;
import com.ymttest.business.service.TradingCallService;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.TestDataManager;
import com.ymttest.utils.YMTDateUtil;

/**
 * 校验物流单号接口接口 FreeMaker Template自动生成代码
 */
@TestSuite
@Ignore
public class Ts_billNoCheck {
	private static DeliveryReq deliveryReq;
	private static BillNoCheckCall billNoCheckCall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("校验物流单号接口");

		String accountid1;
		try {
			accountid1 = AccountCallServiceV2.getAccountId(20238699);
			AccountCallServiceV2.resetAccount(accountid1, new BigDecimal(
					9000000), new BigDecimal(0));
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Before
	public void caseUp() {
		deliveryReq = new DeliveryReq();
		billNoCheckCall = new BillNoCheckCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(billNoCheckCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	/*
	 * 拼邮 Y047 新顺丰（NSF） Y013 顺丰速运（SF-Express） Y068 洋码头官方合作物流
	 * 
	 * 认证直邮 Y013 EMS（国内） Y013 顺丰速运（SF-Express）
	 */

	/**
	 * sellerid 3383 白名单 ，拼邮溯源 商家
	 * 
	 * @param LogisticsTypeEnum
	 *            logisticsType
	 * @return
	 * @throws IOException
	 * @throws ClientProtocolException
	 * @throws NumberFormatException
	 */
	public static TradingServiceResp placeOrder(LogisticsTypeEnum logisticsType)
			throws NumberFormatException, ClientProtocolException, IOException {

		return placeOrder(logisticsType,
				Long.valueOf(EnvSetup.getData("SellerId")));
	}

	/**
	 * sellerid 3383 白名单 ，拼邮溯源 商家
	 * 
	 * @param LogisticsTypeEnum
	 *            logisticsType
	 * @return
	 * @throws IOException
	 * @throws ClientProtocolException
	 */
	public static TradingServiceResp placeOrder(
			LogisticsTypeEnum logisticsType, long sellerId)
			throws ClientProtocolException, IOException {

		PlaceOrderReq req = TradingCallService.buildStandPlaceOrderReq(false);

		String sellerName = JUserCallService.GetUserInfo((int) sellerId)
				.getLoginId();

		// long sellerId = 20227139;
		//
		// String sellerName = "zhangyi_seller0001";

		// long sellerId = Long.valueOf(EnvSetup.getData("autotest_seller1"));
		// String sellerName = String.valueOf(EnvSetup
		// .getData("autotest_sellerName1"));

		req.getOrderGroups().get(0).setSellerId(sellerId);
		req.getOrderGroups().get(0).setSellerLoginId(sellerName);

		OrderVo orderVo;

		// 创建一个普通商品
		TradingCallService.ProductVo pro = TradingCallService.creaderPro(
				sellerId, sellerName, 100);

		orderVo = TradingCallService.createOrderVo(Lists.newArrayList(pro));

		orderVo.setLogisticsType(logisticsType);

		req.getOrderGroups().get(0).setOrders(Lists.newArrayList(orderVo));

		req.setBizSource(null);

		return TradingCallService.callPlaceOrderService(req);

	}

	public static TradingServiceResp placeOrderNotTrace(
			LogisticsTypeEnum logisticsType) {

		PlaceOrderReq req = TradingCallService.buildStandPlaceOrderReq(false);

		// long sellerId = Long.valueOf(EnvSetup.getData("SellerId"));
		//
		// String sellerName = String.valueOf(EnvSetup.getData("SellerName"));

		long sellerId = 20227139;

		String sellerName = "zhangyi_seller0001";

		// long sellerId = Long.valueOf(EnvSetup.getData("autotest_seller1"));
		// String sellerName = String.valueOf(EnvSetup
		// .getData("autotest_sellerName1"));

		req.getOrderGroups().get(0).setSellerId(sellerId);
		req.getOrderGroups().get(0).setSellerLoginId(sellerName);

		OrderVo orderVo;

		// 创建一个普通商品
		TradingCallService.ProductVo pro = TradingCallService.creaderPro(
				sellerId, sellerName, 100);

		orderVo = TradingCallService.createOrderVo(Lists.newArrayList(pro));

		orderVo.setLogisticsType(logisticsType);

		req.getOrderGroups().get(0).setOrders(Lists.newArrayList(orderVo));

		req.setBizSource(null);

		return TradingCallService.callPlaceOrderService(req);

	}

	/**
	 * 
	 * @param expectCheckResultList
	 */
	private void verify(List<ExpectCheckResult> expectCheckResultList) {

		BillNoCheckResp resp = billNoCheckCall.getBillNoCheckResp();

		List<BillNoCheckResult> billNoCheckResults = resp
				.getBillNoCheckResults();

		int i = 0;

		for (ExpectCheckResult expectcheckResultInfo : expectCheckResultList) {

			BillNoCheckResult checkResult = billNoCheckResults.get(i);

			Logger.verifyEquals(expectcheckResultInfo.isBizSuccess(),
					checkResult.isBizSuccess(), "校验BizSuccess");

			Logger.verifyEquals(expectcheckResultInfo.isMicroShopOrder(),
					checkResult.isMicroShopOrder(), "校验microShopOrder");

			Logger.verifyEquals(expectcheckResultInfo.isValidation(),
					checkResult.isValidation(), "校验validation");

			Logger.verifyEquals(expectcheckResultInfo.getBizCode(),
					checkResult.getBizCode(), "校验bizCode");

			Logger.verifyEquals(expectcheckResultInfo.getBizMsg(),
					checkResult.getBizMsg(), "校验bizMsg");

			Logger.verifyEquals(expectcheckResultInfo.getLogisticsType(),
					checkResult.getLogisticsType(), "校验logisticsType");

			Logger.verifyEquals(expectcheckResultInfo.getOrderStatus(),
					checkResult.getOrderStatus(), "校验订单状态");

			Logger.verifyEquals(expectcheckResultInfo.getDeliveryInfo()
					.getBillNo(), checkResult.getBillNo(), "校验billNo");

			Logger.verifyEquals(expectcheckResultInfo.getDeliveryInfo()
					.getOrderId(), checkResult.getOrderId(), "校验orderId");

			Logger.verifyEquals(expectcheckResultInfo.getDeliveryInfo()
					.getDeliverySection(), checkResult.getDeliverySection(),
					"校验deliverySection");

			Logger.verifyEquals(expectcheckResultInfo.getDeliveryInfo()
					.getDeliverySource(), checkResult.getDeliverySource(),
					"校验deliverySource");

			/*
			 * Logger.verifyEquals(deliveryInfo.getExpressName(),
			 * checkResult.getExpressName(), "校验expressName");
			 */

			Logger.verifyEquals(expectcheckResultInfo.getDeliveryInfo()
					.getRealDeliveryArea(), checkResult.getRealDeliveryArea(),
					"校验realDeliveryArea");

			Logger.verifyEquals(expectcheckResultInfo.getDeliveryInfo()
					.getMobile(), checkResult.getMobile(), "校验mobile");

			Logger.verifyEquals(expectcheckResultInfo.getDeliveryInfo()
					.getYmtExpressCode(), checkResult.getYmtExpressCode(),
					"校验ymtExpressCode");

			i++;

		}

	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0011() {
		Logger.start(true, "贝海物流发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.orderAccept();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();
			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0012() {
		Logger.start(true, "贝海物流发货订单,订单状态不是待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService.payOrder();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();
			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0013() {
		Logger.start(true, "贝海物流发货订单,运单号跨买手 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.orderAccept();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();
			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0014() {
		Logger.start(true, "贝海物流发货订单,物流公司和运单号不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.orderAccept();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();
			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_0015() {
		Logger.start(true, "贝海物流发货订单,当前发货时系统时间-运单生成时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.orderAccept();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();
			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_0016() {
		Logger.start(true, "贝海物流发货订单,运单号已使用 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.orderAccept();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();
			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0017() {
		Logger.start(true,
				"贝海物流 发货订单,相同收件人姓名+相同收件地址+相同买家id 使用同一个运单号 超过X单 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.orderAccept();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();
			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0021() {
		Logger.start(true, "第三方直邮 发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(2);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0022() {
		Logger.start(true, "第三方直邮 发货订单,订单状态不是待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			// TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.orderStatusError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.orderStatusError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(2);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(2);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0023() {
		Logger.start(true, "第三方直邮 发货订单,物流公司不存在 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(2);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0024() {
		Logger.start(true, "第三方直邮 发货订单,运单号格式不正确 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRuleError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_0025() {
		Logger.start(true, "第三方直邮 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY, 20227567);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			DeliveryService.saveLogisticsInfo(dInfo.getBillNo(),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());
								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00251() {
		Logger.start(true, "第三方直邮 发货订单,当前发货时 系统时间-运单签收时间不超过10天 发货校验通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			DeliveryService.saveLogisticsInfo(dInfo.getBillNo(),
					YMTDateUtil.getBeforeOrNextDay(-9, YMTDateUtil.YMDHMS));

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());
								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0026() {
		Logger.start(true, "第三方直邮 发货订单,多种不同物流方式订单，同时使用同一第三方直邮发货运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			long tradingId2 = placeOrderResp2.getTradingId();

			BigDecimal useAccountAmount2 = placeOrderResp2.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount2, tradingId2);

			TradingCallService.sellerAcceptOrder(sellerId, orderId2);

			TradingSyncService.getSyncResult(orderId2);

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNo(dInfo.getBillNo());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(1);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(2);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			list.get(1).setLogisticsType(7);

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0027() {
		Logger.start(true,
				"第三方直邮 发货订单,相同收件人姓名+相同收件地址+相同买家id 使用同一个运单号 超过X单 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingServiceResp placeOrderResp3 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);
			long orderId3 = placeOrderResp3.getOrderList().get(0).getOrderId();

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			// 保存运单号
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo);

			billNoCheckCall.setData(deliveryReq);

			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.sameReceiverMaxError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.sameReceiverMaxError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(2);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00281() {
		Logger.start(true, "第三方直邮 发货订单,使用顺丰国际发货传入手机号(不校验号码是否正确)， 发货校验通过");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(12));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y136");
			dInfo.setMobile(TestDataManager.getCommPhoneNum());

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());
								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(2);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00282() {
		Logger.start(true, "第三方直邮,使用顺丰国际发货不传入手机号， 发货校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(12));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y136");

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(2);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_00283() {
		Logger.start(true, "第三方直邮,使用顺丰国际发货传入错误的手机号码， 发货校验失败");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(12));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y073");
			dInfo.setMobile(TestDataManager.getRandomNum(20));

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressCompanyNeedMobile
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressCompanyNeedMobile
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(2);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0031() {
		Logger.start(true, "第三方保税 发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0032() {
		Logger.start(true, "第三方保税 发货订单,订单状态不是待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			// TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.orderStatusError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.orderStatusError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(2);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0033() {
		Logger.start(true, "第三方保税 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	// TODO
	public void Tc_billNoCheck_0034() {
		Logger.start(true, "第三方保税 发货订单,运单号格式不正确 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRuleError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_0035() {
		Logger.start(true, "第三方保税 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.BondedDelivery, 20227567);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNo(),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0036() {
		Logger.start(true, "第三方保税 发货订单,多种不通物流方式订单，同时使用同一 第三方保税发货运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			long tradingId2 = placeOrderResp2.getTradingId();

			BigDecimal useAccountAmount2 = placeOrderResp2.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount2, tradingId2);

			TradingCallService.sellerAcceptOrder(sellerId, orderId2);

			TradingSyncService.getSyncResult(orderId2);

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNo(dInfo.getBillNo());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(1);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			for (int i = 0; i < deliveryReq.getDeliveryInfos().size(); i++) {

				ExpectCheckResult expectCheckResult = new ExpectCheckResult(
						deliveryReq.getDeliveryInfos().get(i));

				if (i == 0) {
					expectCheckResult
							.setBizCode(CheckBizResultEnum.billNoRelatedOtherOrderFromSelfError
									.getCode());
					expectCheckResult
							.setBizMsg(CheckBizResultEnum.billNoRelatedOtherOrderFromSelfError
									.getMessage());
				} else {
					expectCheckResult
							.setBizCode(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
									.getCode());
					expectCheckResult
							.setBizMsg(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
									.getMessage());
				}

				expectCheckResult.setBizSuccess(false);
				expectCheckResult.setValidation(false);

				expectCheckResult.setLogisticsType(4);
				expectCheckResult.setMicroShopOrder(false);
				expectCheckResult.setOrderStatus(17);

				list.add(expectCheckResult);
			}

			list.get(1).setLogisticsType(7);

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0037() {
		Logger.start(true, "第三方保税 发货订单,物流单号已使用,发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.BondedDelivery);

			long orderId2 = placeOrder(LogisticsTypeEnum.BondedDelivery)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.BondedDelivery.getCode(), dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRelatedOtherOrderFromDBError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRelatedOtherOrderFromDBError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00371() {
		Logger.start(true, "第三方保税 发货订单,同一发货批次里,同一订单号对应不同运单号,发货校验通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId);

			dInfo2.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00372() {
		Logger.start(true, "第三方保税 发货订单,同一发货批次里,不通的订单号对应同一运单号,发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			TradingServiceResp placeOrderResp2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.BondedDelivery);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			long tradingId2 = placeOrderResp2.getTradingId();

			BigDecimal useAccountAmount2 = placeOrderResp2.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount2, tradingId2);

			TradingCallService.sellerAcceptOrder(sellerId, orderId2);

			TradingSyncService.getSyncResult(orderId2);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNo(dInfo.getBillNo());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRelatedOtherOrderFromSelfError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRelatedOtherOrderFromSelfError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00381() {
		Logger.start(true, "第三方保税 使用顺丰国际发货传入手机号(不校验号码是否正确),发货校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingCallService.placeOrder(
					LogisticsTypeEnum.BondedDelivery, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);
			Thread.sleep(3000);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(12));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y073");
			dInfo.setMobile(TestDataManager.getCommPhoneNum());
			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00382() {
		Logger.start(true, "第三方保税 使用顺丰国际发货不传入手机号,发货校验失败");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingCallService.placeOrder(
					LogisticsTypeEnum.BondedDelivery, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(12));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y073");
			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0041() {
		Logger.start(true, "进口贸易 发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(1);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0042() {
		Logger.start(true, "进口贸易 发货订单,订单状态不是待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			// TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.orderStatusError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.orderStatusError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(1);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(2);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0043() {
		Logger.start(true, "进口贸易 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(1);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	// TODO
	public void Tc_billNoCheck_0044() {
		Logger.start(true, "进口贸易 发货订单,运单号格式不正确 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(12));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRuleError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(1);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_0045() {
		Logger.start(true, "进口贸易 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNo(),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(1);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0046() {
		Logger.start(
				true,
				"进口贸易 发货订单,多种不通物流方式订单，同时使用同一 第三方直邮发货运单号 发货校验不通过进口贸易 发货订单,多种不通物流方式订单，同时使用同一 第三方直邮发货运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId2);

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNo(dInfo.getBillNo());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(1);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(1);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			list.get(1).setLogisticsType(7);
			list.get(1).setOrderStatus(1);

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0047() {
		Logger.start(true,
				"进口贸易 发货订单,相同收件人姓名+相同收件地址+相同买家id 使用同一个运单号 超过X单 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.China);

			long orderId2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.China).getOrderList().get(0)
					.getOrderId();
			long orderId3 = TradingCallService
					.placeOrder(LogisticsTypeEnum.China).getOrderList().get(0)
					.getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId, 1,
					dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.sameReceiverMaxError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.sameReceiverMaxError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(1);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00511() {
		Logger.start(true, "普通拼邮 国际段 发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("ems");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00512() {
		Logger.start(true, "普通拼邮 国际段 发货订单,订单状态不是国际段待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			// TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageOrderStatusError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageOrderStatusError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(2);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00513() {
		Logger.start(true, "普通拼邮 国际段 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	// TODO
	public void Tc_billNoCheck_00514() {
		Logger.start(true, "普通拼邮 国际段 发货订单,运单号格式不正确 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRuleError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_00515() {
		Logger.start(true, "普通拼邮 国际段 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY, 20227567);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNo(),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00516() {
		Logger.start(true,
				"普通拼邮 国际段 发货订单,多种不通物流方式订单，同时使用同一 普通拼邮 国际段运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId2);

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNo(dInfo.getBillNo());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			list.get(1).setLogisticsType(1);
			list.get(1).setOrderStatus(1);

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00517() {
		Logger.start(true, "普通拼邮 国际段 发货订单,运单被其它拼邮订单的转运段或国内段发过货 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			dInfo.setDeliverySection(2);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);

			dInfo.setDeliverySection(1);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00518() {
		Logger.start(true, "普通拼邮 国际段 发货订单,使用该运单发货的国际段订单超过X单,发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long orderId3 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId, 1,
					dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageBillNoAssociatedMaxError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageBillNoAssociatedMaxError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_005181() {
		Logger.start(true, "普通拼邮 国际段 发货订单,使用该运单发货的国际段订单不超过X单,发货校验通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_005191() {
		Logger.start(true, "普通拼邮 国际段  使用顺丰国际发货传入手机号(不校验号码是否正确),发货校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(12));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y136");
			dInfo.setMobile(TestDataManager.getCommPhoneNum());

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_005192() {
		Logger.start(true, "普通拼邮 国际段  使用顺丰国际发货不传入手机号,发货校验失败");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(12));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y136");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressCompanyNeedMobile
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressCompanyNeedMobile
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00521() {
		Logger.start(true, "普通拼邮 转运段 发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(2);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00522() {
		Logger.start(true, "普通拼邮 转运段 发货订单,订单状态不是国内段待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(2);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageTranShipInterNotDeliveryError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageTranShipInterNotDeliveryError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00523() {
		Logger.start(true, "普通拼邮 转运段 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId, false);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(2);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			// Logger.verifyEquals(billNoCheckCall.getData()
			// .optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	// TODO
	public void Tc_billNoCheck_00524() {
		Logger.start(true, "普通拼邮 转运段 发货订单,运单号格式不正确 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(1));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRuleError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_00525() {
		Logger.start(true, "普通拼邮 转运段 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY, 20227567);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNo(),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());
								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00526() {
		Logger.start(true,
				"普通拼邮 转运段 发货订单,多种不通物流方式订单，同时使用同一 普通拼邮 转运段运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId, false);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(2);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId2);

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNo(dInfo.getBillNo());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			list.get(1).setLogisticsType(1);
			list.get(1).setOrderStatus(1);

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00527() {
		Logger.start(true, "普通拼邮 转运段 发货订单,运单被其它拼邮订单的转运段或国内段发过货 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			dInfo.setDeliverySection(2);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);

			dInfo.setDeliverySection(1);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00528() {
		Logger.start(true, "普通拼邮 转运段 发货订单,使用该运单发货的国际段订单超过X单,发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long orderId3 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId, 1,
					dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageOverdoseDeliveryError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageOverdoseDeliveryError
												.getMessage());
								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_005291() {
		Logger.start(true, "普通拼邮 转运段  使用新顺丰发货传入手机号(不校验号码是否正确),发货校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);
			TradingSyncService.getSyncResult(orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(11));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(2);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("nsf");
			dInfo.setYmtExpressCode("Y047");
			dInfo.setMobile(TestDataManager.getCommPhoneNum());

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_005292() {
		Logger.start(true, "普通拼邮 转运段  使用新顺丰发货不传入手机号,发货校验失败");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);
			TradingSyncService.getSyncResult(orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(11));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(2);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("nsf");
			dInfo.setYmtExpressCode("Y047");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressCompanyNeedMobile
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressCompanyNeedMobile
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00531() {
		Logger.start(true, "普通拼邮 国内段 发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId, false);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00532() {
		Logger.start(true, "普通拼邮 国内段 发货订单,订单状态不是国内段待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrderNotTrace(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00533() {
		Logger.start(true, "普通拼邮 国内段 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	// TODO
	public void Tc_billNoCheck_00534() {
		Logger.start(true, "普通拼邮 国内段 发货订单,运单号格式不正确 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(12) + "s");

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRuleError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_00535() {
		Logger.start(true, "普通拼邮 国内段 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNo(),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());
								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00536() {
		Logger.start(true,
				"普通拼邮 国内段 发货订单,多种不通物流方式订单，同时使用同一 普通拼邮 国际段运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId, false);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId2);

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNo(dInfo.getBillNo());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			list.get(1).setLogisticsType(1);
			list.get(1).setOrderStatus(1);

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00537() {
		Logger.start(true, "普通拼邮 国内段 发货订单,运单被其它拼邮订单的转运段或国内段发过货 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			dInfo.setDeliverySection(2);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);

			dInfo.setDeliverySection(1);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00538() {
		Logger.start(true,
				"普通拼邮 国内段 发货订单,相同收件人姓名+相同收件地址+相同买家id 使用同一个运单号 超过X单 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();
			long orderId3 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId, 1,
					dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.sameReceiverMaxError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.sameReceiverMaxError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_005391() {
		Logger.start(true, "普通拼邮 国内段  使用新顺丰发货传入手机号(不校验号码是否正确)，发货校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);
			TradingSyncService.getSyncResult(orderId);
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 2);
			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(11));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("nsf");
			dInfo.setYmtExpressCode("Y047");
			dInfo.setMobile(TestDataManager.getCommPhoneNum());

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_005392() {
		Logger.start(true, "普通拼邮 国内段  使用新顺丰发货不传入手机号，发货成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);
			TradingSyncService.getSyncResult(orderId);
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 2);
			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(11));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("nsf");
			dInfo.setYmtExpressCode("Y047");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00611() {
		Logger.start(true, "拼邮溯源 国际段 发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00612() {
		Logger.start(true, "拼邮溯源 国际段 发货订单,订单状态不是国际段待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			// TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageOrderStatusError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageOrderStatusError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(2);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00613() {
		Logger.start(true, "拼邮溯源 国际段 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	// TODO
	public void Tc_billNoCheck_00614() {
		Logger.start(true, "拼邮溯源  国际段 发货订单,运单号格式不正确 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRuleError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00615() {
		Logger.start(true, "拼邮溯源 国际段 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNo(),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00616() {
		Logger.start(true,
				"拼邮溯源 国际段 发货订单,多种不通物流方式订单，同时使用同一 普通拼邮 国际段运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = placeOrder(LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId2);

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNo(dInfo.getBillNo());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			list.get(1).setLogisticsType(1);
			list.get(1).setOrderStatus(1);

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00617() {
		Logger.start(true, "拼邮溯源 国际段 发货订单,运单被其它拼邮订单的转运段或国内段发过货 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			dInfo.setDeliverySection(2);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);

			dInfo.setDeliverySection(1);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00618() {
		Logger.start(true, "拼邮溯源 国际段 发货订单,使用该运单发货的国际段订单超过X单,发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long orderId3 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId, 1,
					dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageBillNoAssociatedMaxError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageBillNoAssociatedMaxError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_006181() {
		Logger.start(true, "拼邮溯源 国际段 发货订单,使用该运单发货的国际段订单不超过X单,发货校验通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00621() {
		Logger.start(true, "拼邮溯源 转运段 发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(2);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00622() {
		Logger.start(true, "拼邮溯源 转运段 发货订单,订单状态不是国内段待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(2);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageTranShipInterNotDeliveryError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageTranShipInterNotDeliveryError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00623() {
		Logger.start(true, "拼邮溯源 转运段 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(2);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	// TODO
	public void Tc_billNoCheck_00624() {
		Logger.start(true, "拼邮溯源 转运段 发货订单,运单号格式不正确 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRuleError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_00625() {
		Logger.start(true, "拼邮溯源 转运段 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY, 20227567);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNo(),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00626() {
		Logger.start(true,
				"拼邮溯源 转运段 发货订单,多种不通物流方式订单，同时使用同一 普通拼邮 转运段运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId, false);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(2);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = placeOrder(LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId2);

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNo(dInfo.getBillNo());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			list.get(1).setLogisticsType(1);
			list.get(1).setOrderStatus(1);

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00627() {
		Logger.start(true, "拼邮溯源 转运段 发货订单,运单被其它拼邮订单的转运段或国内段发过货 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			dInfo.setDeliverySection(2);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);

			dInfo.setDeliverySection(1);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00628() {
		Logger.start(true, "拼邮溯源 转运段 发货订单,使用该运单发货的国际段订单超过X单,发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long orderId3 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId, 1,
					dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageBillNoAssociatedMaxError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageBillNoAssociatedMaxError
												.getMessage());
								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00631() {
		Logger.start(true, "拼邮溯源 国内段 发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00632() {
		Logger.start(true, "拼邮溯源 国内段 发货订单,订单状态不是国内段待发货状态 发货校验通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00633() {
		Logger.start(true, "拼邮溯源 国内段 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId, false);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	// TODO
	public void Tc_billNoCheck_00634() {
		Logger.start(true, "拼邮溯源 国内段 发货订单,运单号格式不正确 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(1));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRuleError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_00635() {
		Logger.start(true, "拼邮溯源 国内段 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNo(),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());
								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00636() {
		Logger.start(true,
				"拼邮溯源 国内段 发货订单,多种不通物流方式订单，同时使用同一 普通拼邮 国际段运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId, false);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = placeOrder(LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId2);

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNo(dInfo.getBillNo());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			list.get(1).setLogisticsType(1);
			list.get(1).setOrderStatus(1);

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00637() {
		Logger.start(true, "拼邮溯源 国内段 发货订单,运单被其它拼邮订单的转运段或国内段发过货 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			dInfo.setDeliverySection(2);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);

			dInfo.setDeliverySection(1);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00638() {
		Logger.start(true,
				"拼邮溯源 国内段 发货订单,相同收件人姓名+相同收件地址+相同买家id 使用同一个运单号 超过X单 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();
			long orderId3 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId, 1,
					dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.sameReceiverMaxError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.sameReceiverMaxError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00641() {
		Logger.start(true, "拼邮溯源 香港直邮发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY, Integer.valueOf(1));

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// 香港发货
			dInfo.setRealDeliveryArea(1);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00642() {
		Logger.start(true, "拼邮溯源  香港直邮 发货订单,订单状态不是国内段待发货状态 发货校验通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y072");
			// 香港直邮
			dInfo.setRealDeliveryArea(1);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00643() {
		Logger.start(true, "拼邮溯源 香港直邮 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	// TODO
	public void Tc_billNoCheck_00644() {
		Logger.start(true, "拼邮溯源 香港直邮 发货订单,运单号格式不正确 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(1));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y072");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	@Ignore
	public void Tc_billNoCheck_00645() {
		Logger.start(true, "拼邮溯源 香港直邮 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY, 20227567);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y072");

			dInfo.setRealDeliveryArea(1);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNo(),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());
								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00646() {
		Logger.start(true,
				"拼邮溯源 香港直邮 发货订单,多种不通物流方式订单，同时使用同一 普通拼邮 国际段运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			TradingCallService.delivery(sellerId, orderId, false);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = placeOrder(LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId2);

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNo(dInfo.getBillNo());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRelatedOtherLogisticsTypeError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			list.get(1).setLogisticsType(1);
			list.get(1).setOrderStatus(1);

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00647() {
		Logger.start(true, "拼邮溯源 香港直邮 发货订单,运单被其它拼邮订单的转运段或国内段发过货 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y072");

			dInfo.setRealDeliveryArea(1);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			dInfo.setDeliverySection(2);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);

			dInfo.setDeliverySection(1);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getCode());

								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageBillNoDeliveryOtherSectionError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_00648() {
		Logger.start(true,
				"拼邮溯源 香港直邮 发货订单,相同收件人姓名+相同收件地址+相同买家id 使用同一个运单号 超过X单 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();
			long orderId3 = placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y072");

			dInfo.setRealDeliveryArea(1);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId, 1,
					dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageOverdoseDeliveryError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageOverdoseDeliveryError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0071() {
		Logger.start(true, "订单为微店订单,非拼邮发货，发货校验通过");
		try {

			PlaceOrderReq placeOrderReq = TradingCallService
					.buildStandPlaceOrderReq(false);

			BizVo bizVo = new BizVo();

			// 直播微店
			int bizType = BizTypeEnum.LIVE_WECHAT.getCode();

			String bizId = TestDataManager.getRandomNum(5);

			bizVo.setBizId(bizId);
			bizVo.setBizType(bizType);

			placeOrderReq.setOrderSource(OrderSourceEnum.Wechat);

			placeOrderReq.setBizSource(bizVo);

			// 物流方式
			placeOrderReq.getOrderGroups().get(0).getOrders().get(0)
					.setLogisticsType(LogisticsTypeEnum.BondedDelivery);

			TradingServiceResp placeOrderResp = TradingCallService
					.callPlaceOrderService(placeOrderReq);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());
								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(4);
								expectCheckResult.setMicroShopOrder(true);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0072() {
		Logger.start(true, "订单为微店订单,拼邮发货 国际段，发货校验通过");
		try {

			PlaceOrderReq placeOrderReq = TradingCallService
					.buildStandPlaceOrderReq(false);

			BizVo bizVo = new BizVo();

			// 直播微店
			int bizType = BizTypeEnum.LIVE_WECHAT.getCode();

			String bizId = TestDataManager.getRandomNum(5);

			bizVo.setBizId(bizId);
			bizVo.setBizType(bizType);

			placeOrderReq.setOrderSource(OrderSourceEnum.Wechat);

			placeOrderReq.setBizSource(bizVo);

			// 物流方式
			placeOrderReq.getOrderGroups().get(0).getOrders().get(0)
					.setLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			TradingServiceResp placeOrderResp = TradingCallService
					.callPlaceOrderService(placeOrderReq);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(5));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());
								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(true);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_0073() {
		Logger.start(true,
				"订单为微店订单 发货订单,相同收件人姓名+相同收件地址+相同买家id 使用同一个运单号 超过X单 发货校验不通过");
		try {

			PlaceOrderReq placeOrderReq = TradingCallService
					.buildStandPlaceOrderReq(false);

			BizVo bizVo = new BizVo();

			// 直播微店
			int bizType = BizTypeEnum.LIVE_WECHAT.getCode();

			String bizId = TestDataManager.getRandomNum(5);

			bizVo.setBizId(bizId);
			bizVo.setBizType(bizType);

			placeOrderReq.setOrderSource(OrderSourceEnum.Wechat);

			placeOrderReq.setBizSource(bizVo);

			// 物流方式
			placeOrderReq.getOrderGroups().get(0).getOrders().get(0)
					.setLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			TradingServiceResp placeOrderResp = TradingCallService
					.callPlaceOrderService(placeOrderReq);

			long orderId2 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long orderId3 = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY)
					.getOrderList().get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(8));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo);

			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId, 1,
					dInfo);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageMicroShopBillNoAssociatedMaxError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageMicroShopBillNoAssociatedMaxError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(true);
								expectCheckResult.setOrderStatus(17);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_015() {
		Logger.start(true, "拼邮订单国内段已发 则不允许再发国际段和国内段,发货校验通过");
		try {

			TradingServiceResp placeOrderResp = placeOrderNotTrace(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 3);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("ems");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult.setBizCode(0);
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(true);
								expectCheckResult.setValidation(true);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_billNoCheck_016() {
		Logger.start(true, "拼邮订单出现多个转运段,发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingCallService
					.placeOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			DeliveryInfo dInfo = new DeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("ems");
			dInfo.setYmtExpressCode("Y013");

			DeliveryInfo dInfo2 = new DeliveryInfo();

			dInfo2.setOrderId(orderId);

			dInfo2.setBillNo(TestDataManager.getRandomNum(13));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(2);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("ems");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			deliveryReq.setDeliveryInfos(Lists.newArrayList(dInfo, dInfo2));

			deliveryReq.setSellerId(sellerId);

			billNoCheckCall.setData(deliveryReq);
			billNoCheckCall.callService();

			Logger.verifyEquals(billNoCheckCall.getData()
					.optString("IsSuccess"), "true", "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			deliveryReq
					.getDeliveryInfos()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.packageMultipleSectionError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.packageMultipleSectionError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);

								expectCheckResult.setLogisticsType(7);
								expectCheckResult.setMicroShopOrder(false);
								expectCheckResult.setOrderStatus(3);

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}